package Q.test04162.Controller;

import Q.test04162.Mapper.UserInfo;
import Q.test04162.Service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class UserController {
    @Autowired
    private UserService userService;
    @RequestMapping("/login")
    public boolean login(String name, String password) {
        UserInfo userInfo = userService.query(name, password);
        if (userInfo != null) {
            return true;
        }
        return false;
    }
}